<template>
  <div class="jr">
    <ul class="ul">
      <li>
        <p>{{ leixing }}</p>
        <span> 距结束 </span>
        <van-count-down :time="time">
          <template #default="timeData">
            <span class="block">{{ timeData.hours }}</span>
            <span class="colon">:</span>
            <span class="block">{{ timeData.minutes }}</span>
            <span class="colon">:</span>
            <span class="block">{{ timeData.seconds }}</span>
          </template>
        </van-count-down>
      </li>
      <li><p>爆款家电秒杀 ></p></li>
    </ul>

    <div class="zj">
      <ul v-for="v in chuan1" :key="v.id" @click="fun(v.id)">
        <li>
          <img :src="v.img" />
        </li>
        <li>
          <h6>{{ v.name }}</h6>
          <p>{{ v.textea }}</p>
          <span class="zhijiang">{{ v.zhijiang }}</span>
          <h5 class="h5">
            <span>￥{{ v.money }}</span
            ><del>{{ v.del }}</del>
          </h5>
        </li>
        <li>
          <div class="zuiyou">
            <b></b><span>{{ v.zhanbi }}</span>
            <p>立即抢购</p>
          </div>
        </li>
      </ul>
    </div>

    <!-- 下方三个 -->
    <div class="liebiao">
      <ul v-for="v in chuan2" :key="v.id" @click="fun(v.id)">
        <li>
          <img :src="v.img" class="img" />
        </li>
        <li>
          <p class="p">{{ v.name }}</p>
        </li>
        <li>
          <span class="biankuang">{{ v.zhijiang }}</span>
        </li>
        <li>
          <div class="xiafang">
            <h6 class="left">
              <p><span>￥</span>{{ v.money }}</p>
              <del>{{ v.del }}</del>
            </h6>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: ["leixing","chuan1","chuan2"],
  data() {
    return {
      time: 30 * 60 * 60 * 1000,
    };
  },
  methods: {
    fun(id) {
      this.$router.push({ path: "/xq", query: { id: id } });
    },
  },
};
</script>

<style scoped>
.colon {
  display: inline-block;
  margin: 0 4px;
  color: #ee0a24;
}
.block {
  display: inline-block;
  width: 22px;
  color: #fff;
  font-size: 12px;
  text-align: center;
  background-color: #ee0a24;
}
.jr {
  background-color: white;
  width: 3.86rem;
  margin: auto;
  border-radius: 0.1rem;
}

/* 头部 */
.ul {
  display: flex;
  justify-content: space-between;
  margin-top: 0.1rem;
}
.ul li:nth-child(1) {
  margin-left: 0.1rem;
}
.ul li:nth-child(1) p {
  margin-top: 0.2rem;
  font-size: 0.18rem;
  margin-bottom: 0.1rem;
}
.ul li:nth-child(1) span {
  font-size: 0.14rem;
}

.ul li:nth-child(2) {
  margin-top: 0.2rem;
  margin-right: 0.08rem;
}
.van-count-down {
  display: inline-block;
  margin-bottom: 0.2rem;
}

/* 中间三个列表 */

.zj img {
  width: 1.08rem;
  height: 1.08rem;
}
.zj ul {
  display: flex;
  background-color: rgb(255, 255, 255);
  border-radius: 0.1rem;
  margin-top: 0.15rem;
  height: 1.26rem;
}
.zj ul li {
  margin: 0.06rem;
}
.zj ul li:nth-child(2) h6 {
  font-size: 0.16rem;
}
.zj ul li:nth-child(2) {
  width: 1.6rem;
}
.zj ul li:nth-child(2) p {
  border-color: rgb(243, 8, 11);
  color: rgb(248, 36, 0);
  font-size: 12px;
  font-weight: 400;
  height: 20px;
  letter-spacing: -0.24px;
  line-height: 23px;
  max-width: 216px;
}
.zj .zhijiang {
  margin-top: 0.22rem;
  display: inline-block;
  border: 0.01rem red solid;
  color: red;
}
.zj .h5 {
  font-weight: normal;
}
.zj .h5 span {
  font-size: 0.18rem;
  color: red;
}
.zuiyou {
  width: 0.86rem;
  height: 0.42rem;
  border-color: rgb(255, 51, 18);
  border-radius: 0.06rem;
  background-color: rgb(255, 51, 18);
  margin-top: 0.7rem;
  color: white;
  text-align: center;
}
.zuiyou b {
  width: 0.5rem;
  height: 0.05rem;
  display: inline-block;
  background-color: #ffa292;
  border-radius: 0.1rem;
}
.zuiyou span {
  font-size: 0.1rem;
  display: inline-block;
}

/* x下方三个 */
.liebiao {
  display: flex;
  width: 3.86rem;
  margin: 0 0.07rem;
}
.liebiao .img {
  width: 1.16rem;
  height: 1.16rem;
}
.liebiao ul {
  background-color: rgb(255, 255, 255);
  border-radius: 0.1rem;
  margin-top: 0.15rem;
  /* height: 3rem; */
  width: 1.15rem;
}
.liebiao ul p {
  font-size: 0.16rem;
}
.liebiao li {
  margin: 0.05rem 0.1rem;
}
.liebiao li:nth-child(4) {
  position: relative;
  margin-top: 0.15rem;
}
.liebiao .img1 {
  width: 1.6rem;
  height: 0.46rem;
}
.liebiao .p {
  width: 1rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xiafang {
  color: black;
  width: 1.51rem;
  height: 0.38rem;
}
.left {
  font-weight: normal;
  display: flex;
}
.left p {
  font-size: 0.18rem;
  color: #ee0a24;
}
.left p span {
  font-size: 0.11rem;
}
.right {
  font-weight: normal;
  float: right;
  margin-right: 0.2rem;
  width: 0.5rem;
  font-size: 0.11rem;
}
.biankuang {
  border: 0.01rem solid red;
  color: red;
  display: inline-block;
  margin: auto;
  margin-left: 0.2rem;
}
</style>